package com.lbw.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;

import com.lbw.product.entity.Product;
import com.lbw.service.IProductService;
import org.springframework.stereotype.Service;

@Service
public class ProductServiceImpl implements IProductService {

    /**
     * 根据商品id查询商品信息
     * @param productId
     * @return
     */
    @Override
    public Product getProductById(Long productId) {
        System.out.println("接收到了请求，productId为：" + productId);
        Product product = new Product();
        product.setId(productId);
        product.setPrice(new BigDecimal("99"));
        product.setProductName("苹果-" + productId);
        product.setNum(2);
        product.setProductList(null);
        return product;
    }
}
